package com.briup.app2.dao;

import com.briup.app2.bean.Test;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface TestMapper {
    @Select("select * from test")
    List<Test> selectAll();

    @Insert("insert into test values(null,#{name},#{gender})")
    void insert(Test test);

    @Update("update test set name=#{name},gender=#{gender} where id=#{id}")
    void update(Test test);

    @Delete("delete from test where id=#{id}")
    void delete(Long id);
}
